// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取缓存信息 GET /api/monitor/cache */
export async function cacheGetInfoUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/monitor/cache', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 清空缓存 DELETE /api/monitor/cache/clearCacheAll */
export async function cacheClearAllUsingDELETE(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/monitor/cache/clearCacheAll', {
    method: 'DELETE',
    ...(options || {}),
  });
}

/** 按key删除缓存 DELETE /api/monitor/cache/clearCacheKey/${param0} */
export async function cacheClearKeyUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.cacheClearKeyUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { cacheKey: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/cache/clearCacheKey/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 按名称删除缓存 DELETE /api/monitor/cache/clearCacheName/${param0} */
export async function cacheClearNameUsingDELETE(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.cacheClearNameUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { cacheName: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/cache/clearCacheName/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 按名称获取缓存key GET /api/monitor/cache/getKeys/${param0} */
export async function cacheGetKeysUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.cacheGetKeysUsingGETParams,
  options?: { [key: string]: any },
) {
  const { cacheName: param0, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/cache/getKeys/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 获取缓存列表 GET /api/monitor/cache/getNames */
export async function cacheGetListUsingGET(options?: { [key: string]: any }) {
  return request<Record<string, any>>('/api/monitor/cache/getNames', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 按名称和key获取缓存value GET /api/monitor/cache/getValue/${param1}/${param0} */
export async function cacheGetValueUsingGET(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.cacheGetValueUsingGETParams,
  options?: { [key: string]: any },
) {
  const { cacheKey: param0, cacheName: param1, ...queryParams } = params;
  return request<Record<string, any>>(`/api/monitor/cache/getValue/${param1}/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}
